package com.bcmusic.user.dao;
import com.bcmusic.user.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Value;
import tk.mybatis.mapper.common.Mapper;

/****
 * @Author:admin
 * @Description:User的Dao
 * @Date 2019/6/14 0:12
 *****/
public interface UserMapper extends Mapper<User> {
    /**
     * 根据usernum查询user
     * @param num
     * @return
     */
    @Select("select * from user where user_number=#{num}")
    public User selectUserByNum(@Param("num") String num);

    /**
     * 查询当前最大的userNum
     * @return
     */
    @Select("select max(user_number) from user")
    public String selectMaxUserNum();

}
